package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MaterialXO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ProjectName: IEIS2-COM
 * @Package: com.indusfo.spc.mapper
 * @ClassName: MaterialXOMapper
 * @Author: 熊冰
 * @Description: 物料数据层
 * @Date: 2019/8/19 9:22
 * @Version: 1.0
 */
public interface MaterialXOMapper {
    //新增
    int insertSelective(MaterialXO record);
    //修改
    int updateByPrimaryKeySelective(MaterialXO record);
    //删除
    int deleteMaterialXO(@Param("deteMaterialXO") Long[] deteMaterialXO, @Param("lDataState") Integer lDataState);
    //查询
    List<MaterialXO> selectAllMaterialXO(MaterialXO record);
    //总数
    int countMaterialXO(MaterialXO record);
    //查重
    int countParamsNotRepeat(MaterialXO record);



    //通过物料类型ID删除物料信息
    Integer deleteBymtypePids(@Param("mtypePids") Long[] mtypePids);
    //判断物料编号是否重复
    int countCodeNoRepeat(MaterialXO materialXO);
    //判断物料名称是否重复
    int countNameNoRepeat(MaterialXO materialXO);

    int ListMaterialByMtype(@Param("mtypeIds") Long[] mtypeIds);

    List<MaterialXO> advancedQuery(MaterialXO materialXO);
}
